/**
 * 
 */
package br.com.wagnerfull.precoimovel;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

/**
 * @author wagner
 * 
 */
public class AdapterImagemMenu extends BaseAdapter {

	private Context contexto;

	private int[] imagens;

	private android.view.ViewGroup.LayoutParams params;

	@Override
	public int getCount() {
		return imagens.length;
	}

	public AdapterImagemMenu(Context c, int[] imagens,
			android.view.ViewGroup.LayoutParams params) {
		this.contexto = c;
		this.imagens = imagens;
		this.params = params;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		ImageView img = new ImageView(contexto);
		img.setImageResource(imagens[arg0]);
		img.setAdjustViewBounds(true);
		img.setLayoutParams(params);
		return img;
	}

}
